3.300 \(\int \sec (e+f x) (a+b \sec ^2(e+f x))^p \, dx\)

Optimal. Leaf size=103 \[ \frac{\sin (e+f x) \cos ^2(e+f x)^p \left (1-\frac{a \sin ^2(e+f x)}{a+b}\right )^{-p} F_1\left (\frac{1}{2};p+1,-p;\frac{3}{2};\sin ^2(e+f x),\frac{a \sin ^2(e+f x)}{a+b}\right ) \left (\sec ^2(e+f x) \left (-a \sin ^2(e+f x)+a+b\right )\right )^p}{f} \]

[Out]

(AppellF1[1/2, 1 + p, -p, 3/2, Sin[e + f*x]^2, (a*Sin[e + f*x]^2)/(a + b)]*(Cos[e + f*x]^2)^p*Sin[e + f*x]*(Se
c[e + f*x]^2*(a + b - a*Sin[e + f*x]^2))^p)/(f*(1 - (a*Sin[e + f*x]^2)/(a + b))^p)

________________________________________________________________________________________

Rubi [A]  time = 0.17425, antiderivative size = 124, normalized size of antiderivative = 1.2, number of steps used = 5, number of rules used = 5, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.238, Rules used = {4148, 6722, 1974, 430, 429} \[ \frac{\sin (e+f x) \cos ^2(e+f x)^p \left (-a \sin ^2(e+f x)+a+b\right )^p \left (1-\frac{a \sin ^2(e+f x)}{a+b}\right )^{-p} \left (a \cos ^2(e+f x)+b\right )^{-p} \left (a+b \sec ^2(e+f x)\right )^p F_1\left (\frac{1}{2};p+1,-p;\frac{3}{2};\sin ^2(e+f x),\frac{a \sin ^2(e+f x)}{a+b}\right )}{f} \]

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]*(a + b*Sec[e + f*x]^2)^p,x]

[Out]

(AppellF1[1/2, 1 + p, -p, 3/2, Sin[e + f*x]^2, (a*Sin[e + f*x]^2)/(a + b)]*(Cos[e + f*x]^2)^p*(a + b*Sec[e + f
*x]^2)^p*Sin[e + f*x]*(a + b - a*Sin[e + f*x]^2)^p)/(f*(b + a*Cos[e + f*x]^2)^p*(1 - (a*Sin[e + f*x]^2)/(a + b
))^p)

Rule 4148

Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = Fr
eeFactors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[(a + b/(1 - ff^2*x^2)^(n/2))^p/(1 - ff^2*x^2)^((m + 1)/2), x
], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n/2] &&  !IntegerQ
[p]

Rule 6722

Int[(u_.)*((a_.) + (b_.)*(v_)^(n_))^(p_), x_Symbol] :> Dist[(a + b*v^n)^FracPart[p]/(v^(n*FracPart[p])*(b + a/
v^n)^FracPart[p]), Int[u*v^(n*p)*(b + a/v^n)^p, x], x] /; FreeQ[{a, b, p}, x] &&  !IntegerQ[p] && ILtQ[n, 0] &
& BinomialQ[v, x] &&  !LinearQ[v, x]

Rule 1974

Int[(u_)^(p_.)*(v_)^(q_.), x_Symbol] :> Int[ExpandToSum[u, x]^p*ExpandToSum[v, x]^q, x] /; FreeQ[{p, q}, x] &&
 BinomialQ[{u, v}, x] && EqQ[BinomialDegree[u, x] - BinomialDegree[v, x], 0] &&  !BinomialMatchQ[{u, v}, x]

Rule 430

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Dist[(a^IntPart[p]*(a + b*x^n)^F
racPart[p])/(1 + (b*x^n)/a)^FracPart[p], Int[(1 + (b*x^n)/a)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, n,
p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n, -1] &&  !(IntegerQ[p] || GtQ[a, 0])

Rule 429

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[a^p*c^q*x*AppellF1[1/n, -p,
 -q, 1 + 1/n, -((b*x^n)/a), -((d*x^n)/c)], x] /; FreeQ[{a, b, c, d, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n
, -1] && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])

Rubi steps

\begin{align*} \int \sec (e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (a+\frac{b}{1-x^2}\right )^p}{1-x^2} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac{\left (\cos ^2(e+f x)^p \left (b+a \cos ^2(e+f x)\right )^{-p} \left (a+b \sec ^2(e+f x)\right )^p\right ) \operatorname{Subst}\left (\int \left (1-x^2\right )^{-1-p} \left (b+a \left (1-x^2\right )\right )^p \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac{\left (\cos ^2(e+f x)^p \left (b+a \cos ^2(e+f x)\right )^{-p} \left (a+b \sec ^2(e+f x)\right )^p\right ) \operatorname{Subst}\left (\int \left (1-x^2\right )^{-1-p} \left (a+b-a x^2\right )^p \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac{\left (\cos ^2(e+f x)^p \left (b+a \cos ^2(e+f x)\right )^{-p} \left (a+b \sec ^2(e+f x)\right )^p \left (a+b-a \sin ^2(e+f x)\right )^p \left (1-\frac{a \sin ^2(e+f x)}{a+b}\right )^{-p}\right ) \operatorname{Subst}\left (\int \left (1-x^2\right )^{-1-p} \left (1-\frac{a x^2}{a+b}\right )^p \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac{F_1\left (\frac{1}{2};1+p,-p;\frac{3}{2};\sin ^2(e+f x),\frac{a \sin ^2(e+f x)}{a+b}\right ) \cos ^2(e+f x)^p \left (b+a \cos ^2(e+f x)\right )^{-p} \left (a+b \sec ^2(e+f x)\right )^p \sin (e+f x) \left (a+b-a \sin ^2(e+f x)\right )^p \left (1-\frac{a \sin ^2(e+f x)}{a+b}\right )^{-p}}{f}\\ \end{align*}

Mathematica [B]  time = 16.8257, size = 1995, normalized size = 19.37 \[ \text{result too large to display} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[Sec[e + f*x]*(a + b*Sec[e + f*x]^2)^p,x]

[Out]

(3*(a + b)*AppellF1[1/2, 1/2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*(a + 2*b + a*Cos[2*(e +
 f*x)])^p*Sec[e + f*x]*(Sec[e + f*x]^2)^(-1/2 + p)*(a + b*Sec[e + f*x]^2)^p*Tan[e + f*x])/(f*(3*(a + b)*Appell
F1[1/2, 1/2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + (2*b*p*AppellF1[3/2, 1/2, 1 - p, 5/2,
-Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] - (a + b)*AppellF1[3/2, 3/2, -p, 5/2, -Tan[e + f*x]^2, -((b*Ta
n[e + f*x]^2)/(a + b))])*Tan[e + f*x]^2)*((3*(a + b)*AppellF1[1/2, 1/2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e +
 f*x]^2)/(a + b))]*(a + 2*b + a*Cos[2*(e + f*x)])^p*(Sec[e + f*x]^2)^(1/2 + p))/(3*(a + b)*AppellF1[1/2, 1/2,
-p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + (2*b*p*AppellF1[3/2, 1/2, 1 - p, 5/2, -Tan[e + f*x]
^2, -((b*Tan[e + f*x]^2)/(a + b))] - (a + b)*AppellF1[3/2, 3/2, -p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)
/(a + b))])*Tan[e + f*x]^2) - (6*a*(a + b)*p*AppellF1[1/2, 1/2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)
/(a + b))]*(a + 2*b + a*Cos[2*(e + f*x)])^(-1 + p)*(Sec[e + f*x]^2)^(-1/2 + p)*Sin[2*(e + f*x)]*Tan[e + f*x])/
(3*(a + b)*AppellF1[1/2, 1/2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + (2*b*p*AppellF1[3/2,
1/2, 1 - p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] - (a + b)*AppellF1[3/2, 3/2, -p, 5/2, -Tan[e
+ f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))])*Tan[e + f*x]^2) + (6*(a + b)*(-1/2 + p)*AppellF1[1/2, 1/2, -p, 3/2,
-Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*(a + 2*b + a*Cos[2*(e + f*x)])^p*(Sec[e + f*x]^2)^(-1/2 + p)*T
an[e + f*x]^2)/(3*(a + b)*AppellF1[1/2, 1/2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + (2*b*p
*AppellF1[3/2, 1/2, 1 - p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] - (a + b)*AppellF1[3/2, 3/2, -
p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))])*Tan[e + f*x]^2) + (3*(a + b)*(a + 2*b + a*Cos[2*(e +
f*x)])^p*(Sec[e + f*x]^2)^(-1/2 + p)*Tan[e + f*x]*((2*b*p*AppellF1[3/2, 1/2, 1 - p, 5/2, -Tan[e + f*x]^2, -((b
*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*x])/(3*(a + b)) - (AppellF1[3/2, 3/2, -p, 5/2, -Tan[e + f*
x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*x])/3))/(3*(a + b)*AppellF1[1/2, 1/2, -p, 3/2, -
Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + (2*b*p*AppellF1[3/2, 1/2, 1 - p, 5/2, -Tan[e + f*x]^2, -((b*T
an[e + f*x]^2)/(a + b))] - (a + b)*AppellF1[3/2, 3/2, -p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]
)*Tan[e + f*x]^2) - (3*(a + b)*AppellF1[1/2, 1/2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*(a
+ 2*b + a*Cos[2*(e + f*x)])^p*(Sec[e + f*x]^2)^(-1/2 + p)*Tan[e + f*x]*(2*(2*b*p*AppellF1[3/2, 1/2, 1 - p, 5/2
, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] - (a + b)*AppellF1[3/2, 3/2, -p, 5/2, -Tan[e + f*x]^2, -((b*
Tan[e + f*x]^2)/(a + b))])*Sec[e + f*x]^2*Tan[e + f*x] + 3*(a + b)*((2*b*p*AppellF1[3/2, 1/2, 1 - p, 5/2, -Tan
[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*x])/(3*(a + b)) - (AppellF1[3/2, 3/2, -p,
 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*x])/3) + Tan[e + f*x]^2*(2*b*p*
((-6*b*(1 - p)*AppellF1[5/2, 1/2, 2 - p, 7/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*T
an[e + f*x])/(5*(a + b)) - (3*AppellF1[5/2, 3/2, 1 - p, 7/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*S
ec[e + f*x]^2*Tan[e + f*x])/5) - (a + b)*((6*b*p*AppellF1[5/2, 3/2, 1 - p, 7/2, -Tan[e + f*x]^2, -((b*Tan[e +
f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*x])/(5*(a + b)) - (9*AppellF1[5/2, 5/2, -p, 7/2, -Tan[e + f*x]^2, -
((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*x])/5))))/(3*(a + b)*AppellF1[1/2, 1/2, -p, 3/2, -Tan[e
 + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + (2*b*p*AppellF1[3/2, 1/2, 1 - p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e
+ f*x]^2)/(a + b))] - (a + b)*AppellF1[3/2, 3/2, -p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))])*Tan
[e + f*x]^2)^2))

________________________________________________________________________________________

Maple [F]  time = 0.395, size = 0, normalized size = 0. \begin{align*} \int \sec \left ( fx+e \right ) \left ( a+b \left ( \sec \left ( fx+e \right ) \right ) ^{2} \right ) ^{p}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)*(a+b*sec(f*x+e)^2)^p,x)

[Out]

int(sec(f*x+e)*(a+b*sec(f*x+e)^2)^p,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \sec \left (f x + e\right )^{2} + a\right )}^{p} \sec \left (f x + e\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+b*sec(f*x+e)^2)^p,x, algorithm="maxima")

[Out]

integrate((b*sec(f*x + e)^2 + a)^p*sec(f*x + e), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (b \sec \left (f x + e\right )^{2} + a\right )}^{p} \sec \left (f x + e\right ), x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+b*sec(f*x+e)^2)^p,x, algorithm="fricas")

[Out]

integral((b*sec(f*x + e)^2 + a)^p*sec(f*x + e), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+b*sec(f*x+e)**2)**p,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \sec \left (f x + e\right )^{2} + a\right )}^{p} \sec \left (f x + e\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+b*sec(f*x+e)^2)^p,x, algorithm="giac")

[Out]

integrate((b*sec(f*x + e)^2 + a)^p*sec(f*x + e), x)